<!DOCTYPE html>
<html lang="en">
<head>
    <script >
		var path="${path}";
	</script>
    <meta charset="UTF-8">
    <title>淘惠帮</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link href="${resources}/plugins/fontAwesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="${resources}/plugins/swiper/swiper-3.3.1.min.css" rel="stylesheet" type="text/css">
    <link href="${resources}/css/common.css" rel="stylesheet" type="text/css">
    <link href="${resources}/css/shopsDetail.css" rel="stylesheet" type="text/css">
        <#include "setwxshare.ftl"/>
</head>
<body>
<div id="container">
    <div class="commonHeader">商铺详情
        <a href="javascript:history.go(-1);" class="fa fa-chevron-left back"></a>
    </div>
    <div id="wrapper">
        <!--商品图片-->
        <div class="swiper-container">
            <div class="swiper-wrapper">
            	<#list merchant.merchantPicList as pic>
                <div class="swiper-slide"><img src="${pic.picurl}""></div>
                </#list>
            </div>
            <div class="swiper-pagination"></div>
        </div>
        <!--商品信息-->
        <div class="shop-info">
            <div class="infoTop">
                <p class="shop-name">${merchant.name}</p>
                <p class="score">
                	<span class="scoreCon" data-score="${avgScore}">
                    </span>
                    <span class="num">${avgScore}分</span>&nbsp;&nbsp;
                    <span class="average" >人均：￥${avgTotal}</span>
                </p>
                <p class="month-consume">月消费人次：
                    <span class="num">${avgConsumeNumber}+</span>
                </p>
            </div>
            <div class="address">
                ${merchant.address}
                <a href="${path}/merchant/map/${merchant.id}"><span class="fa fa-map-marker"></span></a>
                <a class="fa fa-phone"  href="tel:${merchant.telephone}"></a>
            </div>
        </div>
        <!--优惠券-->
        <div class="coupon">
            <ul>
            	<#list goodsList as goods>
                <li>
                    <a class="p40" href="${path}/vouchermarket/goods/${goods.id}">
                        <span class="scoupon">劵</span>
                        <p>${goods.name}</p>
                        <p class="last"><span class="precent">￥${goods.price}</span>&nbsp;<span class="previous">门市价:￥${goods.originalPrice}</span></p>
                        <div class="couponRight">
                            <span>已售${goods.sales}</span>&nbsp;<i class="fa fa-chevron-right" aria-hidden="true"></i>
                        </div>
                    </a>
                </li>
                </#list>
            </ul>
        </div>
        <!--商品评价-->
        <div class="evaluationArea">
            <div class="mark">
            	<span class="scoreCon" data-score="${avgScore}"></span>
                <span class="num">${avgScore}分</span>&nbsp;&nbsp;
                <span class="evaNum">${commentNum}评价</span>
            </div>
            <div class="evaluation">
            	<#list commentList as comment>
                <div class="userInfo">
                    <div class="portrait">
                        <img src="${comment.member.headimgurl}" alt="">
                    </div>
                    <div class="username"><span>${comment.member.username}</span>&nbsp;&nbsp;<div class="vip"><img src="${resources}/images/2_5.png" alt=""></div></div>
                    <p class="score">
                    	<span class="scoreCon" data-score="${comment.score}"></span>
                        <span class="date">${comment.createTime?date}</span>
                    </p>
                </div>
                <div class="detail">
                    <p class="content">${comment.content}</p>
                    <div class="pics">
                    	<#list comment.picList as pic>
                        <div>
                            <img src="${pic.picurl}" alt="">
                        </div>
                        </#list>
                    </div>
                </div>
                </#list>
            </div>
            <a href="${path}/comment?merchantid=${merchant.id}" class="viewAll">查看全部评价
                <i class="fa fa-chevron-right" aria-hidden="true"></i></a>
        </div>
        <div class="moreInfo">
            <div class="more">更多信息</div>
            <div class="addBox">
            ${merchant.intro}
			</div>
        </div>
        
    </div>
</div>

</body>

<script src="${resources}/plugins/jquery/2.2.2/jquery.min.js"></script>
<script src="${resources}/plugins/swiper/swiper-3.3.1.jquery.min.js"></script>
<!--<script src="${resources}/scripts/iscroll-probe.js"></script>-->
<!--<script src="${resources}/scripts/品牌购商品详情.js"></script>-->
<script src="${resources}/js/score.js"></script>
<script>
    /*配置轮播图*/
    var mySwiper = new Swiper('.swiper-container', {
        loop: true,
        pagination: '.swiper-pagination',
        autoplay: 2840,
        autoplayDisableOnInteraction: false
    });
    
    /* 评分 */
    score($(".scoreCon"));
</script>
</html>